var id='';

function subMsg(){
	
	var limitDays = $('#limitDays').val();
   if(limitDays==''){
     	alert("贷款期限不能为空！");
     	return false;
     }
   var interestPercent = $('#interestPercent').val();
   if(interestPercent==''){
     	alert("利息不能为空！");
     	return false;
     }
    var overduePercent = $('#overduePercent').val();
   if(overduePercent==''){
     	alert("逾期日利率不能为空！");
     	return false;
     }
            
     $.ajax({
        url:  urlcore +"/api/paramSetting/add",
        type: "post",
        contentType: "application/json;charset=utf-8",
        data: JSON.stringify({
            "id": id,
            "limitDays":limitDays,
            "interestPercent": interestPercent,
            "overduePercent":overduePercent,
        }),
        dataType: "json",
        success:function(data){
            if (data.success == true) {
                
                    alert("新增成功！");
                    //跳转列表页
                    window.location.href = "param_setting_list.html";
                  } else if (data.code == 'OVERTIME') {
                var thisUrl = window.location.href;
                if (thisUrl.indexOf('login.html') <= -1) {
                    top.window.location.href = "login.html";
                }
            } else {
                alert(data.msg);
            }

        },
        error: function() {
            alert("error");
        }

    });
	
	
}
